home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / commandhandler / nsIControllerCommandTable.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  13KB  |  266 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIControllerCommandTable.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIControllerCommandTable_h__
  6. #define __gen_nsIControllerCommandTable_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIControllerCommand_h__
  14. #include "nsIControllerCommand.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsICommandParams_h__
  18. #include "nsICommandParams.h"
  19. #endif
  20.  
  21. /* For IDL files that don't want to include root IDL files. */
  22. #ifndef NS_NO_VTABLE
  23. #define NS_NO_VTABLE
  24. #endif
  25.  
  26. /* starting interface:    nsIControllerCommandTable */
  27. #define NS_ICONTROLLERCOMMANDTABLE_IID_STR "d1a47834-6ad4-11d7-bfad-000393636592"
  28.  
  29. #define NS_ICONTROLLERCOMMANDTABLE_IID \
  30.   {0xd1a47834, 0x6ad4, 0x11d7, \
  31.     { 0xbf, 0xad, 0x00, 0x03, 0x93, 0x63, 0x65, 0x92 }}
  32.  
  33. /**
  34.  * nsIControllerCommandTable
  35.  * 
  36.  * An interface via which a controller can maintain a series of commands,
  37.  * and efficiently dispatch commands to their respective handlers.
  38.  *
  39.  * Controllers that use an nsIControllerCommandTable should support
  40.  * nsIInterfaceRequestor, and be able to return an interface to their
  41.  * controller command table via getInterface().
  42.  * 
  43.  */
  44. class NS_NO_VTABLE nsIControllerCommandTable : public nsISupports {
  45.  public: 
  46.  
  47.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTROLLERCOMMANDTABLE_IID)
  48.  
  49.   /**
  50.    * Make this command table immutable, so that commands cannot
  51.    * be registered or unregistered. Some command tables are made
  52.    * mutable after command registration so that they can be 
  53.    * used as singletons.
  54.    */
  55.   /* void makeImmutable (); */
  56.   NS_IMETHOD MakeImmutable(void) = 0;
  57.  
  58.   /**
  59.    * Register and unregister commands with the command table.
  60.    *
  61.    * @param aCommandName  the name of the command under which to register or
  62.    *                      unregister the given command handler.
  63.    *
  64.    * @param aCommand      the handler for this command.
  65.    */
  66.   /* void registerCommand (in string aCommandName, in nsIControllerCommand aCommand); */
  67.   NS_IMETHOD RegisterCommand(const char *aCommandName, nsIControllerCommand *aCommand) = 0;
  68.  
  69.   /* void unregisterCommand (in string aCommandName, in nsIControllerCommand aCommand); */
  70.   NS_IMETHOD UnregisterCommand(const char *aCommandName, nsIControllerCommand *aCommand) = 0;
  71.  
  72.   /**
  73.    * Find the command handler which has been registered to handle the named command.
  74.    *
  75.    * @param aCommandName  the name of the command to find the handler for.
  76.    */
  77.   /* nsIControllerCommand findCommandHandler (in string aCommandName); */
  78.   NS_IMETHOD FindCommandHandler(const char *aCommandName, nsIControllerCommand **_retval) = 0;
  79.  
  80.   /**
  81.    * Get whether the named command is enabled.
  82.    *
  83.    * @param aCommandName    the name of the command to test
  84.    * @param aCommandRefCon  the command context data
  85.    */
  86.   /* boolean isCommandEnabled (in string aCommandName, in nsISupports aCommandRefCon); */
  87.   NS_IMETHOD IsCommandEnabled(const char *aCommandName, nsISupports *aCommandRefCon, PRBool *_retval) = 0;
  88.  
  89.   /**
  90.    * Tell the command to udpate its state (if it is a state updating command)
  91.    *
  92.    * @param aCommandName    the name of the command to update
  93.    * @param aCommandRefCon  the command context data
  94.    */
  95.   /* void updateCommandState (in string aCommandName, in nsISupports aCommandRefCon); */
  96.   NS_IMETHOD UpdateCommandState(const char *aCommandName, nsISupports *aCommandRefCon) = 0;
  97.  
  98.   /**
  99.    * Get whether the named command is supported.
  100.    *
  101.    * @param aCommandName    the name of the command to test
  102.    * @param aCommandRefCon  the command context data
  103.    */
  104.   /* boolean supportsCommand (in string aCommandName, in nsISupports aCommandRefCon); */
  105.   NS_IMETHOD SupportsCommand(const char *aCommandName, nsISupports *aCommandRefCon, PRBool *_retval) = 0;
  106.  
  107.   /**
  108.    * Execute the named command.
  109.    *
  110.    * @param aCommandName    the name of the command to execute
  111.    * @param aCommandRefCon  the command context data
  112.    */
  113.   /* void doCommand (in string aCommandName, in nsISupports aCommandRefCon); */
  114.   NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) = 0;
  115.  
  116.   /* void doCommandParams (in string aCommandName, in nsICommandParams aParam, in nsISupports aCommandRefCon); */
  117.   NS_IMETHOD DoCommandParams(const char *aCommandName, nsICommandParams *aParam, nsISupports *aCommandRefCon) = 0;
  118.  
  119.   /* void getCommandState (in string aCommandName, in nsICommandParams aParam, in nsISupports aCommandRefCon); */
  120.   NS_IMETHOD GetCommandState(const char *aCommandName, nsICommandParams *aParam, nsISupports *aCommandRefCon) = 0;
  121.  
  122. };
  123.  
  124. /* Use this macro when declaring classes that implement this interface. */
  125. #define NS_DECL_NSICONTROLLERCOMMANDTABLE \
  126.   NS_IMETHOD MakeImmutable(void); \
  127.   NS_IMETHOD RegisterCommand(const char *aCommandName, nsIControllerCommand *aCommand); \
  128.   NS_IMETHOD UnregisterCommand(const char *aCommandName, nsIControllerCommand *aCommand); \
  129.   NS_IMETHOD FindCommandHandler(const char *aCommandName, nsIControllerCommand **_retval); \
  130.   NS_IMETHOD IsCommandEnabled(const char *aCommandName, nsISupports *aCommandRefCon, PRBool *_retval); \
  131.   NS_IMETHOD UpdateCommandState(const char *aCommandName, nsISupports *aCommandRefCon); \
  132.   NS_IMETHOD SupportsCommand(const char *aCommandName, nsISupports *aCommandRefCon, PRBool *_retval); \
  133.   NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon); \
  134.   NS_IMETHOD DoCommandParams(const char *aCommandName, nsICommandParams *aParam, nsISupports *aCommandRefCon); \
  135.   NS_IMETHOD GetCommandState(const char *aCommandName, nsICommandParams *aParam, nsISupports *aCommandRefCon); 
  136.  
  137. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  138. #define NS_FORWARD_NSICONTROLLERCOMMANDTABLE(_to) \
  139.   NS_IMETHOD MakeImmutable(void) { return _to MakeImmutable(); } \
  140.   NS_IMETHOD RegisterCommand(const char *aCommandName, nsIControllerCommand *aCommand) { return _to RegisterCommand(aCommandName, aCommand); } \
  141.   NS_IMETHOD UnregisterCommand(const char *aCommandName, nsIControllerCommand *aCommand) { return _to UnregisterCommand(aCommandName, aCommand); } \
  142.   NS_IMETHOD FindCommandHandler(const char *aCommandName, nsIControllerCommand **_retval) { return _to FindCommandHandler(aCommandName, _retval); } \
  143.   NS_IMETHOD IsCommandEnabled(const char *aCommandName, nsISupports *aCommandRefCon, PRBool *_retval) { return _to IsCommandEnabled(aCommandName, aCommandRefCon, _retval); } \
  144.   NS_IMETHOD UpdateCommandState(const char *aCommandName, nsISupports *aCommandRefCon) { return _to UpdateCommandState(aCommandName, aCommandRefCon); } \
  145.   NS_IMETHOD SupportsCommand(const char *aCommandName, nsISupports *aCommandRefCon, PRBool *_retval) { return _to SupportsCommand(aCommandName, aCommandRefCon, _retval); } \
  146.   NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) { return _to DoCommand(aCommandName, aCommandRefCon); } \
  147.   NS_IMETHOD DoCommandParams(const char *aCommandName, nsICommandParams *aParam, nsISupports *aCommandRefCon) { return _to DoCommandParams(aCommandName, aParam, aCommandRefCon); } \
  148.   NS_IMETHOD GetCommandState(const char *aCommandName, nsICommandParams *aParam, nsISupports *aCommandRefCon) { return _to GetCommandState(aCommandName, aParam, aCommandRefCon); } 
  149.  
  150. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  151. #define NS_FORWARD_SAFE_NSICONTROLLERCOMMANDTABLE(_to) \
  152.   NS_IMETHOD MakeImmutable(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeImmutable(); } \
  153.   NS_IMETHOD RegisterCommand(const char *aCommandName, nsIControllerCommand *aCommand) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterCommand(aCommandName, aCommand); } \
  154.   NS_IMETHOD UnregisterCommand(const char *aCommandName, nsIControllerCommand *aCommand) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterCommand(aCommandName, aCommand); } \
  155.   NS_IMETHOD FindCommandHandler(const char *aCommandName, nsIControllerCommand **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindCommandHandler(aCommandName, _retval); } \
  156.   NS_IMETHOD IsCommandEnabled(const char *aCommandName, nsISupports *aCommandRefCon, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsCommandEnabled(aCommandName, aCommandRefCon, _retval); } \
  157.   NS_IMETHOD UpdateCommandState(const char *aCommandName, nsISupports *aCommandRefCon) { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateCommandState(aCommandName, aCommandRefCon); } \
  158.   NS_IMETHOD SupportsCommand(const char *aCommandName, nsISupports *aCommandRefCon, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportsCommand(aCommandName, aCommandRefCon, _retval); } \
  159.   NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoCommand(aCommandName, aCommandRefCon); } \
  160.   NS_IMETHOD DoCommandParams(const char *aCommandName, nsICommandParams *aParam, nsISupports *aCommandRefCon) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoCommandParams(aCommandName, aParam, aCommandRefCon); } \
  161.   NS_IMETHOD GetCommandState(const char *aCommandName, nsICommandParams *aParam, nsISupports *aCommandRefCon) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommandState(aCommandName, aParam, aCommandRefCon); } 
  162.  
  163. #if 0
  164. /* Use the code below as a template for the implementation class for this interface. */
  165.  
  166. /* Header file */
  167. class nsControllerCommandTable : public nsIControllerCommandTable
  168. {
  169. public:
  170.   NS_DECL_ISUPPORTS
  171.   NS_DECL_NSICONTROLLERCOMMANDTABLE
  172.  
  173.   nsControllerCommandTable();
  174.  
  175. private:
  176.   ~nsControllerCommandTable();
  177.  
  178. protected:
  179.   /* additional members */
  180. };
  181.  
  182. /* Implementation file */
  183. NS_IMPL_ISUPPORTS1(nsControllerCommandTable, nsIControllerCommandTable)
  184.  
  185. nsControllerCommandTable::nsControllerCommandTable()
  186. {
  187.   /* member initializers and constructor code */
  188. }
  189.  
  190. nsControllerCommandTable::~nsControllerCommandTable()
  191. {
  192.   /* destructor code */
  193. }
  194.  
  195. /* void makeImmutable (); */
  196. NS_IMETHODIMP nsControllerCommandTable::MakeImmutable()
  197. {
  198.     return NS_ERROR_NOT_IMPLEMENTED;
  199. }
  200.  
  201. /* void registerCommand (in string aCommandName, in nsIControllerCommand aCommand); */
  202. NS_IMETHODIMP nsControllerCommandTable::RegisterCommand(const char *aCommandName, nsIControllerCommand *aCommand)
  203. {
  204.     return NS_ERROR_NOT_IMPLEMENTED;
  205. }
  206.  
  207. /* void unregisterCommand (in string aCommandName, in nsIControllerCommand aCommand); */
  208. NS_IMETHODIMP nsControllerCommandTable::UnregisterCommand(const char *aCommandName, nsIControllerCommand *aCommand)
  209. {
  210.     return NS_ERROR_NOT_IMPLEMENTED;
  211. }
  212.  
  213. /* nsIControllerCommand findCommandHandler (in string aCommandName); */
  214. NS_IMETHODIMP nsControllerCommandTable::FindCommandHandler(const char *aCommandName, nsIControllerCommand **_retval)
  215. {
  216.     return NS_ERROR_NOT_IMPLEMENTED;
  217. }
  218.  
  219. /* boolean isCommandEnabled (in string aCommandName, in nsISupports aCommandRefCon); */
  220. NS_IMETHODIMP nsControllerCommandTable::IsCommandEnabled(const char *aCommandName, nsISupports *aCommandRefCon, PRBool *_retval)
  221. {
  222.     return NS_ERROR_NOT_IMPLEMENTED;
  223. }
  224.  
  225. /* void updateCommandState (in string aCommandName, in nsISupports aCommandRefCon); */
  226. NS_IMETHODIMP nsControllerCommandTable::UpdateCommandState(const char *aCommandName, nsISupports *aCommandRefCon)
  227. {
  228.     return NS_ERROR_NOT_IMPLEMENTED;
  229. }
  230.  
  231. /* boolean supportsCommand (in string aCommandName, in nsISupports aCommandRefCon); */
  232. NS_IMETHODIMP nsControllerCommandTable::SupportsCommand(const char *aCommandName, nsISupports *aCommandRefCon, PRBool *_retval)
  233. {
  234.     return NS_ERROR_NOT_IMPLEMENTED;
  235. }
  236.  
  237. /* void doCommand (in string aCommandName, in nsISupports aCommandRefCon); */
  238. NS_IMETHODIMP nsControllerCommandTable::DoCommand(const char *aCommandName, nsISupports *aCommandRefCon)
  239. {
  240.     return NS_ERROR_NOT_IMPLEMENTED;
  241. }
  242.  
  243. /* void doCommandParams (in string aCommandName, in nsICommandParams aParam, in nsISupports aCommandRefCon); */
  244. NS_IMETHODIMP nsControllerCommandTable::DoCommandParams(const char *aCommandName, nsICommandParams *aParam, nsISupports *aCommandRefCon)
  245. {
  246.     return NS_ERROR_NOT_IMPLEMENTED;
  247. }
  248.  
  249. /* void getCommandState (in string aCommandName, in nsICommandParams aParam, in nsISupports aCommandRefCon); */
  250. NS_IMETHODIMP nsControllerCommandTable::GetCommandState(const char *aCommandName, nsICommandParams *aParam, nsISupports *aCommandRefCon)
  251. {
  252.     return NS_ERROR_NOT_IMPLEMENTED;
  253. }
  254.  
  255. /* End of implementation class template. */
  256. #endif
  257.  
  258. // {670ee5da-6ad5-11d7-9950-000393636592}
  259. #define NS_CONTROLLERCOMMANDTABLE_CID \
  260.   {0x670ee5da, 0x6ad5, 0x11d7, \
  261.     { 0x99, 0x50, 0x00, 0x03, 0x93, 0x63, 0x65, 0x92 }}
  262. #define NS_CONTROLLERCOMMANDTABLE_CONTRACTID \
  263.  "@mozilla.org/embedcomp/controller-command-table;1"
  264.  
  265. #endif /* __gen_nsIControllerCommandTable_h__ */
  266.